package com.lanchetech.dao;

import com.lanchetech.bean.dto.LotteryWinnersDto;
import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.vo.LotteryWinnersVo;
import com.lanchetech.entity.LotteryRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface LotteryRecordMapper {
    int deleteByPrimaryKey(Long id);

    int insert(LotteryRecord record);

    int insertSelective(LotteryRecord record);

    LotteryRecord selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(LotteryRecord record);

    int updateByPrimaryKey(LotteryRecord record);

    Long countByUserIdAndType(@Param("userId") Long userId, @Param("type") Byte type);

    Long countByUserIdAndLotteryId(@Param("userId") Long userId, @Param("lotteryId") Long lotteryId);

    List<LotteryRecord> findAllPage(PageReq req);

    List<LotteryWinnersVo> lotteryWinners(LotteryWinnersDto lotteryWinnersDto);

    Long queryRecordId(Long lotteryOrderId);

    void updateAddressStatus(Long lotteryRecordId);
}